import OpenAI from "openai";
export default defineEventHandler(async (event) => {
  const body = await readBody(event);
  const openai = new OpenAI({
        baseURL: 'https://dpapi.cn/v1',
        apiKey: 'sk-5vsMXyfpkATLNduN80929959E7694cE9A1F91e81B17337E0'
});

const completion = await openai.chat.completions.create(body);

  return completion.choices[0].message.content;
})
